import request from '@/config/axios'

export interface DistributionVO {
  id: number
  no: string
  name: string
  status: number
}

// 查询提现列表分页
export const getDistributionListPage = async (params) => {
  return await request.get({ url: `/activity/merchant-type/page`, params })
}

// 查询提现列表
export const getDistributionListList = async (params) => {
  return await request.get({ url: `/activity/merchant-type/list`, params })
}

// 查询提现详情
export const getDistributionList = async (id: number) => {
  return await request.get({ url: `/activity/merchant-type/get?id=` + id })
}

// 新增提现
export const createDistributionList = async (data: DistributionVO) => {
  return await request.post({ url: `/activity/merchant-type/create`, data })
}

// 修改提现
export const updateDistributionList = async (data: DistributionVO) => {
  return await request.put({ url: `/activity/merchant-type/update`, data })
}

// 删除提现
export const deleteDistributionList = async (id: number) => {
  return await request.delete({ url: `/activity/merchant-type/delete?id=` + id })
}

// 导出提现 Excel
export const exportDistributionList = async (params) => {
  return await request.download({ url: `/activity/merchant-type/export-excel`, params })
}
